package example1;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * <h3>designPattern</h3>
 * <p>普通用户策略</p>
 * @author : zhang.bw
 * @date : 2020-06-04 17:40
 **/
public class UserDiscountStrategy implements DiscountStrategy {

	@Override
	public BigDecimal getDiscount(BigDecimal total) {
		// 普通会员打九折
		return total.multiply(new BigDecimal("0.1")).setScale(2, RoundingMode.DOWN);
	}

}
